/*
package com.winning.sjzc.common.config;

import com.alibaba.druid.pool.DruidDataSource;
import javax.sql.DataSource;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.mybatis.spring.SqlSessionTemplate;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;

*/
/**
 * description:
 *
 * @author yanxf@winning.com.cn
 * @date 2019/08/06 15:27
 *//*


@Configuration
@MapperScan(basePackages = "com.winning.sjzc.common.dao.mysqltest", sqlSessionTemplateRef = "mysqltestSqlSessionTemplate")
public class MysqlDataSourceConfig {

  @Bean(name = "mysqltestDataSource")
  @ConfigurationProperties(prefix = "spring.datasource.mysqltest")
  public DataSource testDataSource() {
//    return DataSourceBuilder.create().build();
    return new DruidDataSource();
  }

@Bean(name = "mysqltestSqlSessionFactory")
  public SqlSessionFactory testSqlSessionFactory(@Qualifier("mysqltestDataSource") DataSource dataSource)
      throws Exception {
    SqlSessionFactoryBean bean = new SqlSessionFactoryBean();
    bean.setDataSource(dataSource);
    bean.setMapperLocations(new PathMatchingResourcePatternResolver()
        .getResources("classpath:mybatis/mybatis/sqlserver/mysqltest/*.xml"));
    return bean.getObject();
  }

  @Bean(name = "mysqltestTransactionManager")
  public DataSourceTransactionManager testTransactionManager(
      @Qualifier("mysqltestDataSource") DataSource dataSource) {
    return new DataSourceTransactionManager(dataSource);
  }

  @Bean(name = "mysqltestSqlSessionTemplate")
  public SqlSessionTemplate testSqlSessionTemplate(
      @Qualifier("mysqltestSqlSessionFactory") SqlSessionFactory sqlSessionFactory) throws Exception {
    return new SqlSessionTemplate(sqlSessionFactory);
  }



}

*/
